[Groovy] Class UserPatch

java.lang.Object
  fhg2a.ReLogoPatch
      UserPatch

class UserPatch
extends ReLogoPatch

A single patch of terrain on the grid with food resources for tribes to handle (hunt, gather or farm).


Property Summary
java.lang.Object area

java.lang.Object farmedCereal

java.lang.Object habitat

java.lang.Object prey

java.lang.Object wildCereal

 
Method Summary
java.lang.Object crosspopulateFood()

Repopulates empty prey and wild cereal resources based on the number of units on neighboring patches.

java.lang.Object deactivateFarmedCereal()

Replenish and hide farmed cereal capacity.

java.lang.Object farmedCerealNAROnDesert()

Determine the farmed cereal NAR on this patch (if patch is desert).

java.lang.Object farmedCerealNAROnLush()

Determine the farmed cereal NAR on this patch (if patch is lush).

java.lang.Object farmedCerealNAROnMiddle()

Determine the farmed cereal NAR on this patch (if patch is middle habitat).

java.lang.Object farmedCerealOnDesert()

Determine the total amount of farmed cereal on patch (if patch is desert).

java.lang.Object farmedCerealOnLush()

Determine the total amount of farmed cereal on patch (if patch is lush).

java.lang.Object farmedCerealOnMiddle()

Determine the total amount of farmed cereal on patch (if patch is middle habitat).

java.lang.Object farmedCerealTotalNAR()

Determine the farmed cereal NAR on this patch.

java.lang.Object handleFarmedCereal(java.lang.Object maximumEnergyRequired, java.lang.Object populationSize)

Cultivate farmed cereal and return net energy obtained by tribe in 365 14-hour days.

java.lang.Object handlePrey(java.lang.Object maximumEnergyRequired, java.lang.Object populationSize)

Decrement prey and return net energy obtained by tribe in 365 14-hour days.

java.lang.Object handleWildCereal(java.lang.Object maximumEnergyRequired, java.lang.Object populationSize)

Decrement wild cereal and return net energy obtained by tribe in 365 14-hour days.

java.lang.Object preyNAROnDesert()

Determine the prey NAR on this patch (if patch is desert).

java.lang.Object preyNAROnLush()

Determine the prey NAR on this patch (if patch is lush).

java.lang.Object preyNAROnMiddle()

Determine the prey NAR on this patch (if patch is middle habitat).

java.lang.Object preyOnDesert()

Determine the total amount of prey on patch (if patch is desert).

java.lang.Object preyOnLush()

Determine the total amount of prey on patch (if patch is lush).

java.lang.Object preyOnMiddle()

Determine the total amount of prey on patch (if patch is middle habitat).

java.lang.Object preyTotalNAR()

Determine the prey NAR on this patch.

java.lang.Object replenishPrey()

Replenish prey resource and update NAR value.

java.lang.Object replenishWildCereal()

Replenish wild cereal resource and update NAR value.

java.lang.Object setCarryingCapacity(java.lang.Object preyPerSqKm, java.lang.Object wildCerealPerSqKm, java.lang.Object farmedCerealPerSqKm)

Set upper limit for each food resources based on carrying capacity (maximum sustainable density), and initializes number of food units to maximum for each food type (based on area of).

java.lang.Object totalFarmedCereal()

Determine the total amount of farmed cereal on this patch.

java.lang.Object totalPrey()

Determine the total amount of prey on this patch.

java.lang.Object totalWildCereal()

Determine the total amount of wild cereal on this patch.

java.lang.Object wildCerealNAROnDesert()

Determine the wild cereal NAR on this patch (if patch is desert).

java.lang.Object wildCerealNAROnLush()

Determine the wild cereal NAR on this patch (if patch is lush).

java.lang.Object wildCerealNAROnMiddle()

Determine the wild cereal NAR on this patch (if patch is middle habitat).

java.lang.Object wildCerealOnDesert()

Determine the total amount of wild cereal on patch (if patch is desert).

java.lang.Object wildCerealOnLush()

Determine the total amount of wild cereal on patch (if patch is lush).

java.lang.Object wildCerealOnMiddle()

Determine the total amount of wild cereal on patch (if patch is middle habitat).

java.lang.Object wildCerealTotalNAR()

Determine the wild cereal NAR on this patch.

 

Property Detail

area

java.lang.Object area


farmedCereal

java.lang.Object farmedCereal


habitat

java.lang.Object habitat


prey

java.lang.Object prey


wildCereal

java.lang.Object wildCereal


 
Method Detail

crosspopulateFood

java.lang.Object crosspopulateFood()
Repopulates empty prey and wild cereal resources based on the number of units on neighboring patches. Farmed cereal cannot spontaneously repopulate, it must be handled (cultivated) by a tribe.


deactivateFarmedCereal

java.lang.Object deactivateFarmedCereal()
Replenish and hide farmed cereal capacity. Farmed cereal will only become visible again if a tribe farms here.


farmedCerealNAROnDesert

java.lang.Object farmedCerealNAROnDesert()
Determine the farmed cereal NAR on this patch (if patch is desert).
Returns:
Farmed cereal net acquisition rate if habitat is desert, or 0 otherwise.


farmedCerealNAROnLush

java.lang.Object farmedCerealNAROnLush()
Determine the farmed cereal NAR on this patch (if patch is lush).
Returns:
Farmed cereal net acquisition rate if habitat is lush, or 0 otherwise.


farmedCerealNAROnMiddle

java.lang.Object farmedCerealNAROnMiddle()
Determine the farmed cereal NAR on this patch (if patch is middle habitat).
Returns:
Farmed cereal net acquisition rate if habitat is middle, or 0 otherwise.


farmedCerealOnDesert

java.lang.Object farmedCerealOnDesert()
Determine the total amount of farmed cereal on patch (if patch is desert).
Returns:
Total farmed cereal units if habitat is desert, or 0 otherwise.


farmedCerealOnLush

java.lang.Object farmedCerealOnLush()
Determine the total amount of farmed cereal on patch (if patch is lush).
Returns:
Total farmed cereal units if habitat is lush, or 0 otherwise.


farmedCerealOnMiddle

java.lang.Object farmedCerealOnMiddle()
Determine the total amount of farmed cereal on patch (if patch is middle habitat).
Returns:
Total farmed cereal units if habitat is middle, or 0 otherwise.


farmedCerealTotalNAR

java.lang.Object farmedCerealTotalNAR()
Determine the farmed cereal NAR on this patch.
Returns:
Farmed cereal net acquisition rate


handleFarmedCereal

java.lang.Object handleFarmedCereal(java.lang.Object maximumEnergyRequired, java.lang.Object populationSize)
Cultivate farmed cereal and return net energy obtained by tribe in 365 14-hour days. Tribe will never gather more than it needs or more than is available.
Parameters:
energyRequired - Maximum energy required by handling attempt.
populationSize - The number of individuals available to handle food (ignored in farmed cereal handling).
Returns:
Energy obtained from farmed cereal in one year


handlePrey

java.lang.Object handlePrey(java.lang.Object maximumEnergyRequired, java.lang.Object populationSize)
Decrement prey and return net energy obtained by tribe in 365 14-hour days. Tribe will never gather more than it needs or more than is available.
Parameters:
maximumEnergyRequired - Maximum energy required by handling attempt.
populationSize - The number of individuals available to handle food.
Returns:
Energy obtained from prey in one year


handleWildCereal

java.lang.Object handleWildCereal(java.lang.Object maximumEnergyRequired, java.lang.Object populationSize)
Decrement wild cereal and return net energy obtained by tribe in 365 14-hour days. Tribe will never gather more than it needs or more than is available.
Parameters:
maximumEnergyRequired - Maximum energy required by handling attempt.
populationSize - The number of individuals available to handle food.
Returns:
Energy obtained from wild cereal in one year


preyNAROnDesert

java.lang.Object preyNAROnDesert()
Determine the prey NAR on this patch (if patch is desert).
Returns:
Prey net acquisition rate if habitat is desert, or 0 otherwise.


preyNAROnLush

java.lang.Object preyNAROnLush()
Determine the prey NAR on this patch (if patch is lush).
Returns:
Prey net acquisition rate if habitat is lush, or 0 otherwise.


preyNAROnMiddle

java.lang.Object preyNAROnMiddle()
Determine the prey NAR on this patch (if patch is middle habitat).
Returns:
Prey net acquisition rate if habitat is middle, or 0 otherwise.


preyOnDesert

java.lang.Object preyOnDesert()
Determine the total amount of prey on patch (if patch is desert).
Returns:
Total prey units if habitat is desert, or 0 otherwise.


preyOnLush

java.lang.Object preyOnLush()
Determine the total amount of prey on patch (if patch is lush).
Returns:
Total prey units if habitat is lush, or 0 otherwise.


preyOnMiddle

java.lang.Object preyOnMiddle()
Determine the total amount of prey on patch (if patch is middle habitat).
Returns:
Total prey units if habitat is middle, or 0 otherwise.


preyTotalNAR

java.lang.Object preyTotalNAR()
Determine the prey NAR on this patch.
Returns:
Prey net acquisition rate


replenishPrey

java.lang.Object replenishPrey()
Replenish prey resource and update NAR value.


replenishWildCereal

java.lang.Object replenishWildCereal()
Replenish wild cereal resource and update NAR value.


setCarryingCapacity

java.lang.Object setCarryingCapacity(java.lang.Object preyPerSqKm, java.lang.Object wildCerealPerSqKm, java.lang.Object farmedCerealPerSqKm)
Set upper limit for each food resources based on carrying capacity (maximum sustainable density), and initializes number of food units to maximum for each food type (based on area of).
Parameters:
preyPerSqKm - Maximum prey density
wildCerealPerSqKm - Maximum wild cereal density
farmedCerealPerSqKm - Maximum farmed cereal density


totalFarmedCereal

java.lang.Object totalFarmedCereal()
Determine the total amount of farmed cereal on this patch.
Returns:
Total farmed cereal units


totalPrey

java.lang.Object totalPrey()
Determine the total amount of prey on this patch.
Returns:
Total prey units


totalWildCereal

java.lang.Object totalWildCereal()
Determine the total amount of wild cereal on this patch.
Returns:
Total wild cereal units


wildCerealNAROnDesert

java.lang.Object wildCerealNAROnDesert()
Determine the wild cereal NAR on this patch (if patch is desert).
Returns:
Wild cereal net acquisition rate if habitat is desert, or 0 otherwise.


wildCerealNAROnLush

java.lang.Object wildCerealNAROnLush()
Determine the wild cereal NAR on this patch (if patch is lush).
Returns:
Wild cereal net acquisition rate if habitat is lush, or 0 otherwise.


wildCerealNAROnMiddle

java.lang.Object wildCerealNAROnMiddle()
Determine the wild cereal NAR on this patch (if patch is middle habitat).
Returns:
Wild cereal net acquisition rate if habitat is middle, or 0 otherwise.


wildCerealOnDesert

java.lang.Object wildCerealOnDesert()
Determine the total amount of wild cereal on patch (if patch is desert).
Returns:
Total wild cereal units if habitat is desert, or 0 otherwise.


wildCerealOnLush

java.lang.Object wildCerealOnLush()
Determine the total amount of wild cereal on patch (if patch is lush).
Returns:
Total wild cereal units if habitat is lush, or 0 otherwise.


wildCerealOnMiddle

java.lang.Object wildCerealOnMiddle()
Determine the total amount of wild cereal on patch (if patch is middle habitat).
Returns:
Total wild cereal units if habitat is middle, or 0 otherwise.


wildCerealTotalNAR

java.lang.Object wildCerealTotalNAR()
Determine the wild cereal NAR on this patch.
Returns:
Wild cereal net acquisition rate